package com.hongxun.modules.api.service.impl;

import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.hongxun.modules.api.dao.BMaterialDao;
import com.hongxun.modules.api.entity.BMaterialEntity;
import com.hongxun.modules.api.service.BMaterialService;



@Service("bMaterialService")
public class BMaterialServiceImpl implements BMaterialService {
	@Autowired
	private BMaterialDao bMaterialDao;
	
	@Override
	public BMaterialEntity queryObject(String guid){
		return bMaterialDao.queryObject(guid);
	}
	
	@Override
	public List<BMaterialEntity> queryList(Map<String, Object> map){
		return bMaterialDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return bMaterialDao.queryTotal(map);
	}
	
	@Override
	public void save(BMaterialEntity bMaterial){
		bMaterial.setGuid(UUID.randomUUID().toString());
		bMaterialDao.save(bMaterial);
	}
	
	@Override
	public void update(BMaterialEntity bMaterial){
		bMaterialDao.update(bMaterial);
	}
	
	@Override
	public void delete(String guid){
		bMaterialDao.delete(guid);
	}
	
	@Override
	public void deleteBatch(String[] guids){
		bMaterialDao.deleteBatch(guids);
	}

	@Override
	public List<BMaterialEntity> queryForBigtype(){
		return bMaterialDao.queryForBigtype();
	}


	@Override
	public List<BMaterialEntity> queryForMidtype(String bigtype){
		return bMaterialDao.queryForMidtype(bigtype);
	}


}
